﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using Project.Util.DependencyManagement;
using Castle.Windsor;

namespace Project.Util
{
    public class Engine : IEngine
    {

        private ContainerManager _containerManager;

        public void Initialize()
        {
            _containerManager = new ContainerManager(new WindsorContainer());
        }


        public IWindsorContainer Container
        {
            get { return _containerManager.Container; }
        }

        public ContainerManager ContainerManager
        {
            get { return _containerManager; }
        }

        public T Resolve<T>() where T : class
        {
            return ContainerManager.Resolve<T>();
        }

        //public object Resolve(Type type)
        //{
        //    return ContainerManager.Resolve(type);
        //}

        //public Array ResolveAll(Type serviceType)
        //{
        //    throw new NotImplementedException();
        //}

        //public T[] ResolveAll<T>()
        //{
        //    return ContainerManager.ResolveAll<T>();
        //}

    }
}
